<?php
/**
 * Created by Command.
 * User: Vito
 */

declare (strict_types = 1);

namespace app\model;

class WaterElePrice extends BaseModel
{
    //水费
    const WATER_TYPE = 0;
    //电费
    const ELE_TYPE = 1;

    protected $typeEnum = [
        self::WATER_TYPE => '水费(吨)',
        self::ELE_TYPE => '电费(度)',
    ];
    /**
     * @Description: 获取水电单价列表
     * @author: xiayu <cb1071403016@126.com>
     * @Date: 2022-10-31 14:03:58
     * @version: 1.0.0
     * @return [type]
     */    
    public function getWaterElePrice($type){

        $where['type'] = $type;

        return self::where($where)->order('top', 'asc')->select();
    }
}
